<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Calculatrice polonais inversé LO21:  Fichier source de /home/yuntux/UTC/GI02/LO21/projet/projet_propre/pile.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Calculatrice polonais inversé LO21
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="namespaces.html"><span>Espaces&#160;de&#160;nommage</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/yuntux/UTC/GI02/LO21/projet/projet_propre/pile.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="pile_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PILE_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PILE_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stack&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="constante_8h.html" title="Calculatrice en polonais inversé. Classe composite de gestion des constantes.">constante.h</a>&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="complexe_8h.html" title="Calculatrice en polonais inversé. Classe composite de gestion des complexes.">complexe.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="rationnel_8h.html">rationnel.h</a>&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a><a class="code" href="class_pile.html">00010</a> <span class="keyword">class </span><a class="code" href="class_pile.html">Pile</a> : <span class="keyword">public</span> QAbstractListModel
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012     Q_OBJECT
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="keyword">private</span>:
<a name="l00015"></a>00015     QList&lt;Constante*&gt; p;
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="keyword">public</span>:
<a name="l00018"></a>00018     <a class="code" href="class_constante.html">Constante</a>* <a class="code" href="class_pile.html#a2bbdc329f485cd017f8cbf88456ae68a">pop</a>();
<a name="l00019"></a><a class="code" href="class_pile.html#a25c322d47a76d758565bdf9df2253411">00019</a>     <a class="code" href="class_constante.html">Constante</a>* <a class="code" href="class_pile.html#a25c322d47a76d758565bdf9df2253411">top</a>(){<span class="keywordflow">return</span> p.at(0);}
<a name="l00020"></a>00020     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#a18a4d9a9b8013b36a5423817f9fb9049">push</a>(<a class="code" href="class_constante.html">Constante</a>* ptr);
<a name="l00021"></a><a class="code" href="class_pile.html#ae45e55f151180284728643cb9cfe4095">00021</a>     <span class="keywordtype">bool</span> <a class="code" href="class_pile.html#ae45e55f151180284728643cb9cfe4095">isEmpty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> p.isEmpty();}
<a name="l00022"></a><a class="code" href="class_pile.html#aaae1107e877f7094bdbd97839c731634">00022</a>     <span class="keywordtype">int</span> <a class="code" href="class_pile.html#aaae1107e877f7094bdbd97839c731634">size</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> p.size();}
<a name="l00023"></a><a class="code" href="class_pile.html#a07d95a908492bd45d1ac105aa78f9dcd">00023</a>     <a class="code" href="class_pile.html#a07d95a908492bd45d1ac105aa78f9dcd">Pile</a>(QObject *parent = 0):QAbstractListModel(parent){};
<a name="l00024"></a>00024     <span class="keyword">virtual</span> <a class="code" href="class_pile.html#ab2d1398d675586ff34994e2b109df152">~Pile</a>();
<a name="l00025"></a>00025     <a class="code" href="class_constante.html">Constante</a>* <a class="code" href="class_pile.html#a91875101e0976f054d1db8869a00b11d">sum</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x=2);
<a name="l00026"></a>00026     <a class="code" href="class_constante.html">Constante</a>* <a class="code" href="class_pile.html#a312bdfd2e167615c8d7f11adb2e639ed">mean</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x=2);
<a name="l00027"></a>00027     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#aa3991438f190580607d7bbbd50ecc0c3">clear</a>();
<a name="l00028"></a>00028     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#a081f7843d01cae1f0f7be7d92e46d5d2">dup</a>();
<a name="l00029"></a>00029     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#a7488ed257c6ceb16ed57a9fffb0726d5">drop</a>();
<a name="l00030"></a>00030     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#ab6c3f9840427e2be87e0d76c8697fff5">swap</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y);
<a name="l00031"></a>00031     QString <a class="code" href="class_pile.html#a4964563804a254503d6413e5ba83d3c5">afficher</a>() <span class="keyword">const</span>;
<a name="l00032"></a>00032     <a class="code" href="class_pile.html">Pile</a>* <a class="code" href="class_pile.html#a4be384a2c00fff0afed507231a2974dc">copier_pile</a>();
<a name="l00033"></a>00033     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#a380c3a467b58c175aef4f2cdc0f7a2c7">sauv_pile_context</a>();
<a name="l00034"></a>00034 
<a name="l00035"></a>00035     <span class="comment">//surcharge des fonctions virtuelles pures de QAbstractItemModel pour la MAJ du QListView</span>
<a name="l00036"></a>00036     <span class="keywordtype">int</span> <a class="code" href="class_pile.html#a44545327a8d02ad9775a2c918ea5cdfc">rowCount</a>(<span class="keyword">const</span> QModelIndex &amp;parent) <span class="keyword">const</span>;
<a name="l00037"></a>00037     QVariant <a class="code" href="class_pile.html#ac9d6e388d3a98eb57a786f9bbec30952">data</a>(<span class="keyword">const</span> QModelIndex &amp;index, <span class="keywordtype">int</span> role) <span class="keyword">const</span>;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">protected</span>:
<a name="l00040"></a>00040 
<a name="l00041"></a>00041     <span class="keywordtype">void</span> <a class="code" href="class_pile.html#a8d34708706c113ec9864f7c37c9083a2">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_pile.html">Pile</a>&amp;);
<a name="l00042"></a>00042 };
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="preprocessor">#endif // PILE_H</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Espaces de nommage</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Énumérations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Valeurs énumérées</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Généré le Samedi Juin 16 2012 23:51:37 pour Calculatrice polonais inversé LO21 par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
